Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Polygon Tweener Component

A component of type kTweenTypePolygon tweens one polygon into another. All input polygons must be convex and not self-intersecting.

Input data: An array of 27 fixed-point values ( Fixed[27]) that specifies three four-sided polygons. Each polygon is specified by 9 consecutive array elements. The first element in each set of 9 contains the number of points used to specify the polygon; this value is coerced to a long integer, and it must always be 4 after coercion. The following 8 values in each set of nine are four x, y pairs that specify the corners of the polygon.

The first set of 9 elements specifies the dimensions of a sprite or track to be mapped. For example, if the object is a sprite, the four points are (0,0) , (spriteWidth, 0) , (spriteWidth, spriteHeight) , (0, spriteHeight) . The next set of 9 elements specifies the initial polygon into which the sprite or track is mapped. The next set of 9 elements specifies the ending polygon into which the sprite or track is mapped.

Output data: A MatrixRecord that can be used to map the sprite or track into a four-sided polygon. During the duration of the tween, the shape of this polygon is transformed linearly from that of the initial polygon specified in the input data to that of the ending polygon specified in the input data.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |